import warnings


def str2dict(string, sep_ele="-", sep_value=":"):
    new_dict = {}
    for ele in string.strip().split(sep_ele):
        try:
            key, value = ele.split(sep_value)
        except Exception as e:
            warnings.warn(str(e))
            continue
        new_dict[key] = value
    # print(new_dict)
    return new_dict
